package string;

/**
 * boolean startsWith(String str)
 * boolean endsWith(String str)
 * 判断当前字符串是否以给定的字符串开始或结束。
 */
public class StartsWithDemo {
    public static void main(String[] args) {
        String l = "http://tedu.com";

        boolean s = l.startsWith("http");//true
        boolean e = l.endsWith(".com");//true
        System.out.println(s+","+e);
    }
}
